package com._bytecode.__asm._ClassReader;

import org.objectweb.asm.ClassReader;

import java.io.IOException;

/**
 * @Author: huangya
 * @Date: 2020/09/16
 * @Description:
 */
public class ParseClassTest {

    public static void main(String[] args) {
        ClassPrinter cp = new ClassPrinter();
        ClassReader cr = null;
        try {
            //解析java.lang.Runnable字节码
            cr = new ClassReader("java.lang.Runnable");
        } catch (IOException e) {
            e.printStackTrace();
        }
        //触发ClassVisitor中一系列visit事件
        cr.accept(cp, 0);
    }
}
